/**
 *
 * Copyright 2015 RSVP Technologies Inc. All rights reserved.
 * Demo.java
 *
 */
package com.gfinal.webcollector;

import java.util.ArrayList;

import org.jsoup.nodes.Document;

/**
 * @author Gao Yudong (gyd@nbicc.com)
 * @date 2015-3-5
 */
public class Demo extends BaseWebCollector {

	@Override
	protected ArrayList<String> generateSeedUrlsList() {
		ArrayList<String> list = new ArrayList<String>();
		for(int i = 0; i < 100; i++)
			list.add("http://www.iteye.com/problems/52781");
		return list;
	}

	@Override
	protected Object getResultSet(String url, Document doc) {
		return "ok";
	}

	@Override
	protected boolean saveResult(Object o) {
		System.out.println(o);
		return true;
	}

	@Override
	protected boolean FailureHandle(String url) {
		return false;
	}
	
	public static void main(String[] args) throws Exception {
		Demo demo = new Demo();
		demo.execute();
//		while(!demo.isFinish());
		System.out.println(demo.getCollectResult());
	}

}
